function process_plot_2d(mesh, pde, U, flag)
x = mesh.node(:,1);
y = mesh.node(:,2);
figure;
if 3 == nargin
    trisurf(mesh.elem(:,1:3), x, y, U);
elseif 1 == flag
    unique_x = unique(x);
    unique_y = unique(y);
    [X, Y] = meshgrid(unique_x, unique_y);
    Z = griddata(x, y, U, X, Y, "linear");
    surf(X, Y, Z);
elseif 2 == flag
    scatter3(x, y, U, 20, U, 'filled');
end
colormap('parula');
colorbar;
title(['Example: ', num2str(pde.index)]);
xlabel('x');
ylabel('y');
zlabel('uh');
end